// ActionScript file
package kii.utils
{
	/**
	 * Formats instance to string. 
	 */
	public function formatToString(instance:Object, className:String, ...properties):String
	{
		var string:String = '[' + className + ' ';
		for each ( var property:String in properties)
			string += property + '=' + instance[property] + ' ';
		string = string.substring(0, string.length - 1);
		string += ']';
		return string;
	}
}